package com.zixi.beverage_order.config;
//全面扩展 SpringMVC

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration

public class MyMvcConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {//添加视图控制器
        registry.addViewController("/").setViewName("index.html");//到了“/”可以给它走到“index”
        registry.addViewController("/index").setViewName("index.html");
        registry.addViewController("/system").setViewName("system.html");
        registry.addViewController("/signup").setViewName("signup.html");
        registry.addViewController("/delivery").setViewName("topmenu/delivery.html");
        registry.addViewController("/pickup").setViewName("topmenu/pickup.html");
    }

}

